/**
 * 	 Copyright (c) 2008, 2009 Lukas Zaruba
 * 
 *   This file is part of UniAnalyzer (Universal Analyzer).
 *
 *   UniAnalyzer is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   UniAnalyzer is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public License
 *   along with UniAnalyzer. If not, see <http://www.gnu.org/licenses/>.
 */


package net.zarubsys.unianalyzer.dataminers.lpt.gui.plugin;

import net.zarubsys.unianalyzer.dataminers.lpt.gui.parameterObject.PreviewData;

import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;

/**
 * LPTGUIPlugin
 *
 * @author  &lt;A HREF=&quot;mailto:lukas.zaruba@gmail.com&quot;&gt;Lukas Zaruba&lt;/A&gt
 * @version $Revision$ $Date$
 */
public class LPTGUIPlugin extends AbstractUIPlugin {
	
	private static LPTGUIPlugin INSTANCE;
	public static final String PLUGIN_ID = "net.zarubsys.unianalyzer.dataminers.lpt.gui"; //$NON-NLS-1$
	
	public static final String PORT_DATA = "port.data"; //$NON-NLS-1$
	public static final String PORT_STATUS = "port.status"; //$NON-NLS-1$
	public static final String PORT_CONTROL = "port.control"; //$NON-NLS-1$

	public LPTGUIPlugin() {
		INSTANCE = this;
	}
	
	public static LPTGUIPlugin getDefault() {
		return INSTANCE;
	}
	
	@Override
	protected void initializeImageRegistry(ImageRegistry reg) {
		super.initializeImageRegistry(reg);
		reg.put(PORT_DATA, imageDescriptorFromPlugin(PLUGIN_ID, "graphic/lpt_data.gif")); //$NON-NLS-1$
		reg.put(PORT_STATUS, imageDescriptorFromPlugin(PLUGIN_ID, "graphic/lpt_status.gif")); //$NON-NLS-1$
		reg.put(PORT_CONTROL, imageDescriptorFromPlugin(PLUGIN_ID, "graphic/lpt_control.gif")); //$NON-NLS-1$
	}
	
	public Image getImage(PreviewData pd) {
		return LPTGUIPlugin.getDefault().getImageRegistry().get(pd.getImageKey());
	}

}


/*
 * $Log$
 */